package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerSalaryStatisticsMapper;
import com.traffic.domain.PerSalaryStatistics;
import com.traffic.service.IPerSalaryStatisticsService;

/**
 * 工资统计Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerSalaryStatisticsServiceImpl implements IPerSalaryStatisticsService 
{
    @Autowired
    private PerSalaryStatisticsMapper perSalaryStatisticsMapper;

    /**
     * 查询工资统计
     * 
     * @param salaryId 工资统计主键
     * @return 工资统计
     */
    @Override
    public PerSalaryStatistics selectPerSalaryStatisticsBySalaryId(Long salaryId)
    {
        return perSalaryStatisticsMapper.selectPerSalaryStatisticsBySalaryId(salaryId);
    }

    /**
     * 查询工资统计列表
     * 
     * @param perSalaryStatistics 工资统计
     * @return 工资统计
     */
    @Override
    public List<PerSalaryStatistics> selectPerSalaryStatisticsList(PerSalaryStatistics perSalaryStatistics)
    {
        return perSalaryStatisticsMapper.selectPerSalaryStatisticsList(perSalaryStatistics);
    }

    /**
     * 新增工资统计
     * 
     * @param perSalaryStatistics 工资统计
     * @return 结果
     */
    @Override
    public int insertPerSalaryStatistics(PerSalaryStatistics perSalaryStatistics)
    {
        return perSalaryStatisticsMapper.insertPerSalaryStatistics(perSalaryStatistics);
    }

    /**
     * 修改工资统计
     * 
     * @param perSalaryStatistics 工资统计
     * @return 结果
     */
    @Override
    public int updatePerSalaryStatistics(PerSalaryStatistics perSalaryStatistics)
    {
        perSalaryStatistics.setUpdateTime(DateUtils.getNowDate());
        return perSalaryStatisticsMapper.updatePerSalaryStatistics(perSalaryStatistics);
    }

    /**
     * 批量删除工资统计
     * 
     * @param salaryIds 需要删除的工资统计主键
     * @return 结果
     */
    @Override
    public int deletePerSalaryStatisticsBySalaryIds(Long[] salaryIds)
    {
        return perSalaryStatisticsMapper.deletePerSalaryStatisticsBySalaryIds(salaryIds);
    }

    /**
     * 删除工资统计信息
     * 
     * @param salaryId 工资统计主键
     * @return 结果
     */
    @Override
    public int deletePerSalaryStatisticsBySalaryId(Long salaryId)
    {
        return perSalaryStatisticsMapper.deletePerSalaryStatisticsBySalaryId(salaryId);
    }
}
